#ifndef THREADINGMANAGER_H
#define THREADINGMANAGER_H

#include <QThread>
#include <QObject>

class ThreadingManager : public QObject
{
    Q_OBJECT
public:
    explicit ThreadingManager(QObject *parent = nullptr);

    void start();
    void stop();

    virtual QObject* initialization() = 0;

signals:
    void ping();
    void pong();

protected:
    QThread m_thread;
};

#define THREADING_DECLARE(T, signal_slot_func)\
    connect(this, &T##Manager::signal_slot_func, worker, &T##Worker::signal_slot_func)

#endif // THREADINGMANAGER_H
